home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-03-19 | 2.2 KB | 45 lines | [TEXT/MMCC] |
- //------------------------------------------------------------------------------
- // File: bound3d.cp
- // Date: 7/20/94
- // Author: Bretton Wade
- //
- // Description: this file contains the class definition for a 3d bound widget.
- //
- //------------------------------------------------------------------------------
-
- #include "colors.h"
- #include "3d look.h"
- #include "3d bound.h"
-
- //------------------------------------------------------------------------------
- // constructor
- //------------------------------------------------------------------------------
- bound3d::bound3d (Rect &c1, Rect &c2, bool u) : bound (c1, c2) // constructor
- { // begin
- up = u; // copy the 3d look parameter
- } // end
-
- //------------------------------------------------------------------------------
- // update the widget
- //------------------------------------------------------------------------------
- void bound3d::Update (EventRecord &event) // method to draw the widget and all of its children
- { // begin
- RGBBackColor (&GREY); // set the background color
- EraseRect (&(*region)->rgnBBox); // erase the frame contents
- RGBBackColor (&WHITE); // restore the background color
- widget::Update (event); // do what the other widgets do
- } // end
-
- //------------------------------------------------------------------------------
- // draw the widget
- //------------------------------------------------------------------------------
- void bound3d::Draw (void) // method to draw the widget
- { // begin
- if (up) // if the frame is up
- FrameRectUp ((*region)->rgnBBox); // give the frame a 3d look (up)
- else // otherwise
- FrameRectDown ((*region)->rgnBBox); // give the frame a 3d look (down)
- } // end
-
- //------------------------------------------------------------------------------
-